<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<%@taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>
<script>
$(function(){
	$('#list').click(function(){
		location.href='/ecadmin/memberMsg/list.do';
	});
	$('#createTemplate').click(function(){
		location.href='/ecadmin/memberMsg/toUpdateTemplate.do';
	});
});
</script>
${pu:reqSet('hql', 'from MemberMsgTemplate order by title desc') }
${pu:reqSet('templates', pu:queryByHql(hql, null, null)) }
<br />
<h1>会员通知管理-范本列表

</h1>
<table width="100%">
<tr>
<td>
<div class="f-link"><a href="javascript:;" id="list">会员通知列表</a></div>
<yaodian100:checkPermission permissions="OTHER_MEMBER-MSG-MGR"> 
<div class="f-link"><a href="javascript:;" id="createTemplate">新建通知范本</a></div>
</yaodian100:checkPermission>
</td>
</tr>
</table>
<table class="tb-1" width="100%">
		<thead>
			<tr>
				<th></th>
				<th>序号</th>
				<th>Title</th>
				<th>信件主旨</th>
				<th>补偿礼券</th>
				<th>补偿积分</th>

			</tr>
		</thead>
		<tbody>
			<c-rt:forEach items="${templates}" var="template" varStatus="rows_index">
				<tr class="${rows_index.count % 2 == 0 ? 'bg-yl' : ''}">
					<td>
					<input type="button" value="编辑" onclick="location.href='/ecadmin/memberMsg/toUpdateTemplate.do?tempId=${template.id}'"/>
					</td>
					<td>
					${template.id }
					</td>
					<td>
					${template.title }
					</td>
					<td>${template.subject }</td>
					<td><c-rt:if test="${template.isCoupon=='1' }">是</c-rt:if><c-rt:if test="${template.isCoupon=='0' }">否</c-rt:if></td>
					<td><c-rt:if test="${template.isBonus=='1' }">是</c-rt:if><c-rt:if test="${template.isBonus=='0' }">否</c-rt:if></td>
					
				</tr>
			</c-rt:forEach>
		</tbody>
	</table>